package com.zhen.concurrent.chapter08;

public interface RunnableQueue {

    /**
     * 接收新的Runnable存放到队列中
     * @param runnable
     */
    void offer(Runnable runnable);

    /**
     * 从队列中获取Runnable实例
     * @return Runnable实例
     */
    Runnable take() throws InterruptedException;

    /**
     * 获取任务队列中任务的数量
     * @return 任务的数量
     */
    int size();

}
